package com.guoning.office_system.mapper;

import com.guoning.office_system.model.User;
import com.guoning.office_system.vo.Criteria;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Mapper
@Component("UserMapper")
public interface UserMapper {
    Long selectUserCount();

    List<User> selectAllUser(User user);

    List<User> selectAll();

    User selectUserForLogin(User user);

    Long selectByConditionCount(Criteria criteria);

    List<User> selectByCondition(Criteria criteria);

    List<User> selectByConditionForExport(Criteria criteria);

    Long selectByUser(User user);

    Long selectAllUserNotHaveDepartmentCount(Criteria criteria);

    List<User> selectAllUserNotHaveDepartment(Criteria criteria);

    int deleteDepartment(List list);

    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByList(List<User> list);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectUserByLoginName(String loginName);

    int updateLoginErrorNum(User user);
}